import request from '@/utils/request'

// 查询商户配件列表
export function listPart(query) {
  return request({
    url: '/shop/part/list',
    method: 'get',
    params: query
  })
}

// 查询商户配件详细
export function getPart(partId) {
  return request({
    url: '/shop/part/' + partId,
    method: 'get'
  })
}

// 新增商户配件
export function addPart(data) {
  return request({
    url: '/shop/part',
    method: 'post',
    data: data
  })
}

// 修改商户配件
export function updatePart(data) {
  return request({
    url: '/shop/part',
    method: 'put',
    data: data
  })
}

// 删除商户配件
export function delPart(partId) {
  return request({
    url: '/shop/part/' + partId,
    method: 'delete'
  })
}

// 导出商户配件
export function exportPart(query) {
  return request({
    url: '/shop/part/export',
    method: 'get',
    params: query
  })
}